Skip to content

btc(coin): template_other_txs decode wire — reconstructor slice 6/7 - #840

Merged
frstrtr merged 1 commit into
masterfrom
btc/template-other-txs-m
Jul 25, 2026
Merged

btc(coin): template_other_txs decode wire — reconstructor slice 6/7#840
frstrtr merged 1 commit into
masterfrom
btc/template-other-txs-m

Conversation

@frstrtr

@frstrtr frstrtr commented Jul 25, 2026

Copy link
Copy Markdown
Owner

Reconstructor slice 6/7. btc::coin::template_other_txs is the decode wire between TemplateCapture (slice 3 / #837) transactions[] and the won-block reconstructor template_other_txs_fn seam (slice 5 / #839).

  • deserialize_template_tx(data_hex) — one GBT data (with-witness hex) -> MutableTransaction.
  • deserialize_template_other_txs(json)transactions[] -> txs in template order; empty/absent => empty vector (coinbase-only, the reconstructor empty contract); malformed data throws so the closure fails the won block CLOSED (mirrors unpack_gentx_coinbase).
  • make_template_other_txs_fn(provider) — adapts the captured-tx provider into the seam signature; decode errors propagate => fail CLOSED.

Decode wire only; wiring the concrete provider into the main_btc run-loop is slice 7. Cut off origin/master (not stacked). btc_share_test 79/79 (BtcTemplateOtherTxs 4/4), btc-tree-only.

DEP: touches src/impl/btc/test/CMakeLists.txt test-list line (same line as #837/#838/#839) — union on merge.

…reconstructor other_txs (reconstructor slice 6/7)

btc::coin::template_other_txs bridges TemplateCapture transactions[] to the won-block reconstructor template_other_txs_fn seam: deserialize_template_tx / deserialize_template_other_txs (template order; empty-array => coinbase-only; malformed data => throw => fail CLOSED) + make_template_other_txs_fn adapting the captured-tx provider. Decode wire only; main_btc run-loop wiring is slice 7. btc_share_test 79/79 (BtcTemplateOtherTxs 4/4), btc-tree-only.
@frstrtr
frstrtr force-pushed the btc/template-other-txs-m branch from 3ca0892 to cc916ef Compare July 25, 2026 08:06
@frstrtr
frstrtr merged commit 7685b39 into master Jul 25, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant